<?php

/**
 *
 * @author lijun10
 *        
 *        
 */
class Application_Form_PurchaseAgent extends Zend_Form {
	
	public function init(){
		$this->setMethod('POST');
		
		$this->addElement('text','url',array(
				'label'=>'请输入商品网址',
				'required'=>true,
				'filters'    => array('StringTrim'),
				'validators' => array(array('StringLength', false, array(8)))
				
				));
		$this->addElement('text','name',array(
				'label'=>'商品名称',
				'required'=>true,
				'filters'=>array('StringTrim'),
				'validators'=>array(array('StringLength',false,array(2)))
				));
		
		$this->addElement(new Zend_Form_Element_Hidden('image'));
		
		$this->addElement('text','shipFee',array('label'=>'邮费',
				'required'=>true,
				'filters'=>array('StringTrim')
				));
		
		
		$this->addElement('text','price',array(
				'label'=>'商品价格'));
		
		$quantity = new Zend_Form_Element_Text('quantity');
		$quantity->setLabel('商品数量')
			->setValue(1)
			->setRequired(true)
			->setValidators(array('Digits'));
		
		$this->addElement($quantity);
		
		$this->addElement(new Zend_Form_Element_Hidden('sku'));
		
		$this->addElement('text','comment');
		
		$this->addElement(new Zend_Form_Element_Submit('添加到购物车'));
	}
}

?>